import { ref, watchEffect } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { others, navbars, tabbars } from '@/router/index.js';

const route = useRoute();
const router = useRouter();

console.log(useRoute);
export const isShowMain = ref(true);
watchEffect(() => {
  const index = others.findIndex(_s => _s.path === route.path);
  isShowMain.value = index === -1 ? true : false; 
})

export const isShowTabbar = ref(false);
watchEffect(() => {
  const index = tabbars.findIndex(_s => _s.path === route.path);
  isShowTabbar.value = index === -1 ? false : true; 
})

export const isShowNavBar = ref(false);
watchEffect(() => {
  const index = navbars.findIndex(_s => _s.path === route.path);
  isShowNavBar.value = index === -1 ? false : true; 
})